home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
090
/
jazclib1.arc
/
READSECT.C
< prev
next >
Wrap
Text File
|
1986-01-22
|
609b
|
31 lines
readsect(fnum , ftrack , fsector , fhead , fdrive , fbuf )
int fnum , ftrack , fsector , fhead , fdrive;
char *fbuf;
{
union REGS win,wout;
struct SREGS wsegreg;
segread(&wsegreg); /* get register values */
win.x.bx = (int) fbuf;
win.h.ah = 2;
win.h.al = fnum;
win.h.ch = ftrack;
win.h.cl = fsector;
win.h.dh = fhead;
win.h.dl = fdrive;
#if DEBUG
printf("\n%04x %04x %04x %04x %04x",win.x.ax,win.x.bx,
win.x.cx,win.x.dx,wsegreg.es);
#endif
int86x(0x13,&win,&wout,&wsegreg);
if (wout.x.cflag & 1 == 1) return(-1);
else return(0);
}